PATH 
Mac OS 8 and 9 Developer Documentation > Text and Other International Services > Apple Type Services for Unicode Imaging (ATSUI) > Apple Type Services for Unicode Imaging Reference

     

ATSUCreateAndCopyStyle

Creates a copy of a style object.

OSStatus ATSUCreateAndCopyStyle (
                     ATSUStyle iStyle,
                     ATSUStyle *oStyle);
iStyle
A reference of type ATSUStyle. Pass a valid style object to be copied. You cannot pass NULL for this parameter.

oStyle
A pointer to a reference of type ATSUStyle. On return, oStyle references a style object that contains the same style run attributes, font features, and font variations set in the iStyle parameter. You cannot pass NULL for this parameter.

function result
A result code. See Result Codes.
DISCUSSION
The ATSUCreateAndCopyStyle function creates a copy of the contents of the style object you pass in the iStyle parameter, including those style run attribute, font feature, and font variation values that are not set in this style object. Those style run attributes that are not set in the source style object will be set to the default values listed in Table C-1 in the newly-created style object. Those font features and font variations that are not set in the source style object will be set to font-default values in the newly-created style object. ATSUCreateAndCopyStyle does not copy reference constants.

If you wish to copy the entire contents of a style object into an existing style object, call the function ATSUCopyAttributes. To copy style run attributes, font features, and font variations that were previously set in the source style object into the destination style object, regardless of whether or not these values are set in the destination style object, call the function ATSUOverwriteAttributes. To copy only those style run attributes, font features, and font variations that were previously set in the source style object but not set in the destination style object, call the function ATSUUnderwriteAttributes.

SPECIAL CONSIDERATIONS
ATSUCreateAndCopyStyle allocates memory in your application heap, unless you designate a different heap by calling the function ATSUCreateMemorySetting.

VERSION NOTES
Available beginning with ATSUI 1.0.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)